<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <link rel="stylesheet" href="css/shop.css">
    <title>Title</title>
</head>
<body>
<!--<%@ include file="../common/top.jsp"%>-->
<div th:block th:insert="~{common/top}"></div>
<style>
    .display{
        max-height: 500px;
        width: 500px;
        overflow-y: auto;
        overflow-x: hidden;
    }

    table{
        line-height: 30px;

        width: 500px;
    }
</style>

<div class="display">
    <center>
        <h2 style="color: rgb(190, 158, 111);">My Orders</h2>

        <table>
            <tr>
                <th>Order ID</th>
                <th>Date</th>
                <th>Total Price</th>
            </tr>

            <div th:each="order:${session.orderList}">
                <tr>
                    <td>
                        <a th:href="@{viewOrderForm(orderId=${order.orderId},type='cart')}" th:text="${order.orderId}" ></a>
                    </td>
                    <td th:text="${order.orderDate}">
<!--                        ${order.orderDate}-->
<!--                        <fmt:formatDate pattern="yyyy/MM/dd" />-->
                    </td>
                    <td th:text="${order.totalPrice}">
<!--                        <fmt:formatNumber value="${order.totalPrice}" pattern="$#,##0.00" />-->
                    </td>
                </tr>

            </div>

        </table>
        <div id="BackLink">
            <a href="mainForm">
                <button><span>返回主页面</span></button>
            </a>
        </div>
    </center>
</div>


</body>
</html>